<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
    <link rel="shortcut icon" href="__STATIC__/src/common/img/cauliflower-small.png" type="image/x-icon" />
    <link rel="stylesheet" type="text/css"  href="__STATIC__/src/common/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css"  href="__STATIC__/src/common/css/common.css" />
</head>
<body>
{include file="common/header"}
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="alert alert-info {$alert}">
                现在暂无任何考试信息！立即<strong><a href="__ROOT__/teacher/Exam/addExam">添加考试</a></strong>？
                <!--<button class="close" data-dismiss="alert"><span>&times;</span></button>-->
            </div>
            <div class="{$table}">
                <form action="__ROOT__/teacher/Exam/deleteExam" method="post">
                    <div class="panel panel-default" style="display: inline-block;">
                        <div class="panel-heading">
                            <h3 class="panel-title">考试信息</h3>
                        </div>
                        <table class="table table-striped table-hover table-bordered">
                            <tr>
                                <!--<th><input type="checkbox" onchange="checkAllOrNot(this)"></th>-->
                                <th>ID</th>
                                <th>考试名称</th>
                                <th>开始时间</th>
                                <th>考试时长</th>
                                <th>是否自动开始</th>
                                <th>考试状态</th>
                                <th>是否清理</th>
                                <th>考生详情</th>
                            </tr>
                            {volist name="exams" id="exam" key="key"}
                            {php}$examName=$exam['exam_name']{/php}
                            <tr>
                                <!--<td><input type="checkbox" name="items[]" value="" onchange="changeValue(this)"></td>-->
                                <td>{$key}</td>
                                <td><a href='{:url("exam/examManager?examName=$examName")}' class="normal-text hint">{$exam.exam_name}</a></td>
                                <td>{$exam.exam_startTime}</td>
                                <td>{$exam.exam_duration}</td>
                                <td>
                                    {$exam.exam_autoStart ? '是' : '否'}
                                </td>
                                <td>
                                    {switch name="exam.status"}
                                    {case value="0"}未开始{/case}
                                    {case value="1"}正在进行{/case}
                                    {case value="2"}已完成{/case}
                                    {default /}未知
                                    {/switch}
                                </td>
                                <td>
                                    {if condition="$exam.isClean==0"}未清理
                                    {else /}已清理
                                    {/if}
                                </td>
                                <td>
                                    <a href="__ROOT__/teacher/Exam/examineeInfo/examName/{$exam.exam_name}" data-toggle="tooltip" title="考生详情">
                                        <img class="small-img" src="__STATIC__/src/common/img/info.png" />
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                        </table>
                    </div>
                    <div>
                        <a class="btn btn-primary" href="__ROOT__/teacher/Exam/addExam">新增考试</a>
                    </div>
                    {$exams->render()}
                </form>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/src/common/js/jquery-3.2.1.js"></script>
<script src="__STATIC__/src/common/js/bootstrap.js"></script>
<script src="__STATIC__/src/common/js/admin.js"></script>
<script src="__STATIC__/src/common/js/teacher.js"></script>
<script>
    $(function() {
        $("[data-toggle='tooltip']").tooltip();
    });
</script>
</body>
</html>